﻿using Nova.Data;
using Nova_MOD;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Nova_DAL
{
    public class TDelStorage_ListDal : BaseRepository<TDelStorage_List>
    {
        public List<DelStorageListModel> GetDelStorageListModel(string stockNo)
        {
            string sqlStr = string.Format(@"SELECT DISTINCT TDL.PID,TDL.StockNo,TDL.Mat_Code,TDL.Num,TDL.Act_Num,
                    ISNULL(TCD.DETAIL_PID,0) DETAIL_PID FROM dbo.TDelStorage_List TDL LEFT JOIN dbo.TCommandsDetail TCD
                    ON TDL.PID = TCD.DETAIL_PID WHERE TDL.StockNo='{0}'", stockNo);
            return GetByConditionList<DelStorageListModel>(sqlStr);
        }
    }
}
